<<<<<<< HEAD
import java.util.Arrays;

public class Test {
    /* public static void main(String[] args) {
         int []arr1={1,2,6,8,7,5};
         int []newarry=new int[arr1.length];
         int dex1=0;
         int dex=arr1.length-1;

         for (int i = 0; i <arr1.length ; i++) {
             if(arr1[i]%2!=0){
                 newarry[dex1]=arr1[i];
                 dex1++;
             }else{
                 newarry[dex]=arr1[i];
                 dex--;
             }
         }
         System.out.println(Arrays.toString(newarry));
     }*/
   /*public static void main(String[] args) {
       int[]arr={1,6,9,8,7,2};
       for (int i = 0; i <arr.length ; i++) {
           for (int j = 0; j <arr.length-1 ; j++) {
               if (arr[j] > arr[j + 1]) {
                   int temp = arr[j];
                   arr[j] = arr[j + 1];
                   arr[j + 1] = temp;
               }

           }


       }
       System.out.println(Arrays.toString(arr));

   }*/
  /* public static void main(String[] args) {
       int arr[]={2,7,11,15};
       int target=9;
       System.out.println(Arrays.toString(twosum(arr, target)));
   }
   public int[] twosum(int[]nums,int target) {
       for (int i = 0; i < nums.length; i++) {
           for (int j = i + 1; j < nums.length; j++) {
               if (target - nums[i] == nums[j])
                   return new int[]{i, j};

           }

       }
   }*/
   /*public static void main(String[] args) {
       int []arr={1,2,2,3,3};
      int num=0;
       for (int i = 0; i <arr.length ; i++) {

           num=arr[i]^arr[i+1];

       }
       num=num^1;
       System.out.println(num);
   }*/
   /*public  static int[] transform(int[]arry){
       for (int i = 0; i <arry.length ; i++) {
           arry[i]=arry[i]*2;


       }
       return arry;

   }
   public static void main(String[] args) {
       int []arry={1,2,3,4,5};
       System.out.println(Arrays.toString(transform(arry)));


   }*/
 /*  public static void main(String[] args) {
       int []arr={1,2,3,4,5};
       int total=0;
       double avg=0;
       for (int i = 0; i <arr.length ; i++) {
           total+=arr[i];

       }
       avg=(double)total/arr.length;
       System.out.println(avg);
   }
   //给一个数组，和目标值，从数组中找到俩个数相加等于目标值的俩个数，返回这俩个数的下标
*//*public  static int[] Mao(int []arr,int target){
       for (int i = 0; i <arr.length ; i++) {
           for (int j = 1; j <arr.length ; j++) {
               if(arr[i]+arr[j]==target){
                   return new int[]{i,j};
               }

           }

       }return null;
   }
   public static void main(String[] args) {
       int[]arr={2,7,11,15};
       int target=9;
       System.out.println(Arrays.toString(Mao(arr, target)));

   }*/
    //主要实现一个数组中，只有一个数字出现一次，其余都出现二次，找出出现一次的这个数字
   /*public static void main(String[] args) {
       int []arr={1,2,3,1,2};
       int a=0;
       int sum=0;
       for (int i =0 ; i <arr.length ; i++) {
           sum^=arr[i]^a;
       }
       System.out.println(sum);

   }*/
    //一个数组中，出现一个数的次数大于n/2次，打印这个数
    /*public  static int Find(int[]arr){
        return arr[arr.length/2];
    }
   public static void main(String[] args) {
       int []arr={1,2,2,2,2,3,4};
       System.out.println(Find(arr));
   }*/
    //这道题主要是判断一个数数组中是否存在连续三个奇数的数字，存在返回true，否则返回false
   /* public static boolean is(int[] arr) {
        int count = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] % 2 != 0) {
                count++;
                if (count == 3) {
                    return true;
                }

            }else{
                count = 0;
            }

        }
        return false;

    }


   public static void main(String[] args) {
       int []arr={2,4,5,6,8,7,4,3};
       System.out.println(is(arr));


   }*/

}
=======
import java.util.Scanner;

public class Test {
    /*public static int max2(int a,int b){
        return a>b?a:b;
    }
    public static int max3(int a,int b,int c){
        int temp=max2( a, b);
        return temp>c?temp:c;

    }
    public static void main(String[] args) {
        System.out.println(max2(2, 5));
        System.out.println(max3(2, 5, 4));

    }*/
  /*  public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入你要求的前几项阶乘数:");
        int n=sc.nextInt();
        int num=1;
        int sum=0;
        for (int i = 1; i <= n; i++) {

               num*=i;
               sum+=num;

        }
        System.out.println(sum);





    }*/
    /*public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入你所求第几项斐波那契数:");
        int n=sc.nextInt();
        int sum=fab(n);
        System.out.println(sum);

    }
    public static int fab(int n){
        if(n==1){
            return 0;
        }else if(n==2){
            return 1;
        }else {
            return fab(n-1)+fab(n-2);
        }

    }*/

   /* public static void main(String[] args) {
        int num1=max(3,5);
        double num2=max(1.1,2.5,3.6);
        System.out.println(num1);
        System.out.println(num2);

    }*/
    /*public static int max(int a,int b){
        return a>b?a:b;
    }
    public static double max(double a,double b,double c){
        if(a>b){
            if(a>c){
                return c;
            }return c;
        }
        if(a<b){
            if(b<c)
                return c;
        }return b;
    }*/
    /*public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入你要求的前几项阶乘数:");
        int n=sc.nextInt();
        int num=fun(n);
        System.out.println(num);


    }
    public static int fun(int a)
    {
        if(a==1)
            return 1;
        else{
            int sum=a*fun(a-1);
            return sum;
        }
    }*/
   public static void main(String[] args) {
      Scanner sc=new Scanner(System.in);
      System.out.println("请输入元盘的个数:");
      int n=sc.nextInt();
      int num=fun(n);
      System.out.println(num);

      }


   public static int fun(int a){
      if(a==1)
         return 1;
      else {
         int num=fun(a-1)+1+fun(a-1);
         return num;
      }
   }

}

>>>>>>> 011e3ef1637c08930d1b7f7050a3c13027439be4
